struct file {
    char name[MAX_NAMESZ];
    char * kbuf;
    unsigned int rptr, wptr;
    int id;
    struct sleeplk lk;
};

struct filelist {
    char file[NR_MFSFILE][MAX_NAMESZ];
    struct sleeplk lk;
};

struct fpath {
    char name[MAX_NAMESZ];
    struct sleeplk lk;
};

void mfsinit ();
struct file * allocfile (char * name);
int freefile (void * ctx); 
//int freeko (struct ko * o);
int readfile (struct file * f, void * to, unsigned int sz) ;
int read_fileko (struct ko * o, void * to, unsigned int sz);
int write_fileko (struct ko * o, void * from, unsigned int sz);
int fetch_filelist (struct filelist * flsbuf);
int rm_file (struct fpath * pa);